<include file="Public/head"/>
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/plugin/select2/select2.css" />
<script src="{:get_style_cdnurl()}paimai/yunying/plugin/select2/select2.js" type="text/javascript"></script>
<script src="http://img1.isou365.cn/paimai/yunying/js/city.js" type="text/javascript"></script>
<style type="text/css">
    .remarks{width: 100%;height: auto; margin-top: 20px; }
    .remarks span{display: block;width: 90px;float: left;line-height: 65px;font-size:14px;}
    .remarks textarea{border: 1px solid #c8c8c8;  float: left;  height: 65px;  padding: 5px;  resize: none;  width: 745px;}
</style>
<include file="Public/common_header"/>
<div class="mian">
    <include file="Public/sidebar" menu="cwgl.czbc"/>
    <div class="mianR">
        <h3 class="yonghu">基本信息</h3>
        <div class="chezhu-xinxi">
            <div class="xinxi-conter xinxi-conter1" style="background: none;border: none">
                <h4 class="order_no">拍卖单号：<b>{$detail.order_no}</b></h4>
            </div>
            <br/>
            <div class="xinxi-conter xinxi-conter1">
                <h4>车主信息</h4>
                <ul>
                    <li class="clearfix">
                        <em>车主类型</em><em class="name-text">{$detail.owner_type_name}</em>
                        <if condition="$detail.owner_type eq 1">
                            <em>车主姓名</em><em class="name-text">{$detail.contact_person}</em>
                            <else />
                            <em>公司名称</em><em class="name-text">{$detail.contact_person}</em>
                        </if>
                    </li>
                    <li class="clearfix">
                        <if condition="$detail.owner_type eq 1">
                            <em>联系电话</em><em class="name-text">{$detail.contact_mobile}</em>
                            <else />
                            <em>联系人姓名</em><em class="name-text">{$detail.company_contact_person}</em>
                            <em>联系电话</em><em class="name-text">{$detail.contact_mobile}</em>
                        </if>
                    </li>
                </ul>
            </div>
            <br/>

            <div class="xinxi-conter xinxi-conter1">
                <h4>
                    车辆信息
                    <a href="/Car/report/car_id/{$detail.car_id}" target="_blank">
                        <span style="float:right;padding-right: 10%;color:#20ab4f;">检测报告</span>
                    </a>
                </h4>
                <ul>
                    <li class="clearfix">
                        <em>车型</em><em class="name-text">{$detail.model}</em>
                        <em>排放标准</em><em class="dian-hua">{$detail.emission}</em>
                    </li>

                    <li class="clearfix">
                        <em>初登日期</em><em class="name-text">{$detail.first_reg_date}</em>
                        <em>颜色</em><em class="dian-hua">{$detail.car_color}</em>
                    </li>
                    <li class="clearfix">
                        <em>表显里程</em><em class="name-text">{$detail.pointer_mileage}万公里</em>
                        <em>车况级别</em><em class="name-text">{$detail.composite_state}{$detail.accident_level}</em>
                    </li>
                    <li class="clearfix">
                        <em>车辆注册地</em><em class="name-text">{$detail.reg_city}</em>
                        <em>车架号</em><em class="name-text">{$detail.vin}</em>
                    </li>
                    <li class="clearfix">
                        <em>过户限制</em><em class="name-text">{$transfer_type[$car_detail['transfer_limit']]}</em>
                        <em>车牌号</em><em class="name-text">{$detail.plate_prefix}{$detail.plate_suffix}</em>
                    </li>
                    <li class="clearfix">
                        <em>渠道来源</em><em class="name-text">
                        <if condition="$car_detail.comefrom neq ''">
                            <?php if(empty($car_detail['comefrom_url'])):?>
                            <?php echo $show_from[$car_detail['comefrom']];?>
                            <?php else: ?>
                            <a href="{$car_detail.comefrom_url}" target="_blank" rel="noreferrer"><?php echo $show_from[$car_detail['comefrom']];?></a>
                            <?php endif;?>
                            <else/>
                            未知
                        </if>
                    </em>
                        <em>所在地</em><em class="name-text">{$detail.location_area_name}</em>
                    </li>
                </ul>
            </div>
            <br/>
            <if condition="$detail.car_source eq 1">
                <div class="xinxi-conter xinxi-conter1">
                    <h4>收款人信息</h4>
                    <ul>
                        <li class="clearfix">
                            <em>收款人姓名</em>
                            <em class="name-text">{$detail.account_name}</em>
                            <em>开户行</em>
                            <em class="name-text">{$detail.bank_name}</em>
                        </li>
                        <li class="clearfix">
                            <em>开户行账号</em>
                            <em class="name-text" style="width: 845px;">{$detail.card_no}</em>
                        </li>
                    </ul>
                </div>
                <br/>
            </if>
            <div class="xinxi-conter xinxi-conter1">
                <h4>退车信息</h4>
                <ul>
                    <li class="clearfix">
                        <em>补偿金额</em><em class="name-text" style="width: 845px;">{$detail.compensate_amount}元</em>
                    </li>
                    <li class="clearfix">
                        <em>退车备注</em><em class="name-text" style="width: 845px;">{$detail.bc_remark}</em>
                    </li>
                </ul>
            </div>
        </div>

        <div class="remarks clearfix">
            <span>备注</span>
            <textarea name="compensate_remark" id="compensate_remark"></textarea>
        </div>

        <div class="yongBtn">
            <input type="hidden" name="id" value="{$detail.id}">
            <input type="submit" value="确认补偿" class="queding"/>
            <input class="quxiao" type="submit" value="返回" onclick="history.back();">
        </div>
    </div>
    <div class="clear"></div>
</div>
<script type="text/javascript">
    $('.queding').on('click',function(){
        var compensate_id = $("input[name='id']").val();
        var compensate_remark = $("#compensate_remark").val();
        var params = {
            'compensate_id': compensate_id,
            'compensate_remark': compensate_remark
        }
        $.post('/CarOwnerCompensate/do_compensate_deal', params, function (data) {
            if (data.code == '200') {
                btn_alert(data.msg, 2000, function () {
                    window.location.href = document.referrer;
                });
            } else {
                shibai_alert(data.msg);
                return false;
            }
        }, 'json');
    });
</script>
<include file="Public/foot" />